﻿using System;
using System.Collections.Generic;
using System.Data;
using Loki.Data;
using Luna.Model.Common;

namespace Luna.Data
{
   /// <summary>
    /// Generator for data interface ISearchData.
    /// </summary>
    public partial class Manager
    {
        public void Load(Luna.Data.Common.ISearchData data)
        {               
            data.PK = Generator.GetGuid();
            data.DisplayName = Generator.GetString(50);
            data.ItemType = Generator.GetEnum<SearchItemType>();
            data.SearchField = Generator.GetString(450);
        }
        
        public bool AreSame(Luna.Data.Common.ISearchData data1, Luna.Data.Common.ISearchData data2)
        {
            bool buffer = true;
            
            buffer &= data1.PK == data2.PK;
            buffer &= data1.DisplayName == data2.DisplayName;
            buffer &= data1.ItemType == data2.ItemType;
            buffer &= data1.SearchField == data2.SearchField;
            return buffer;
        }
    }
}